package spaceinvaders;

import javax.swing.JFrame;

public class SpaceInvaders extends JFrame implements Common {

	private static int level=1;
	public static int health = 100;
	public static int score = 0;
	
	public SpaceInvaders()
	{
		add(new Game(level, health, score));
		setTitle("Space Invaders");
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setSize(BOARDX, BOARDY);
		setLocationRelativeTo(null);
		setVisible(true);
		setResizable(false);
	}

	public static void main(String[] args) {
		new SpaceInvaders();
	}
	
	public static void restartGame() {
		level = 1;
		new SpaceInvaders();
	}
	
	public static void nextLevel() {
		level++;
		new SpaceInvaders();
	}
	
	public static int getLevel(){
		return level;
	}
}